@echo off

set app_bin_addr=0x01000
set boot_bin_addr=0x00000
set blank_bin_add0=0x3fb000
set esp_init_data_bin_addr=0x3fc000
set blank_bin_add1=0x3fe000

set app_bin=../bin/upgrade/user1.4096.new.6.bin
set boot_bin=../bin/boot_v1.7.bin
set blank_bin=../bin/blank.bin
set esp_init_data_bin=../bin/esp_init_data_default_v08.bin

esptool.py --port COM5 --baud 921600 write_flash %boot_bin_addr% %boot_bin% %app_bin_addr% %app_bin% %blank_bin_add0% %blank_bin% %esp_init_data_bin_addr% %esp_init_data_bin% %blank_bin_add1% %blank_bin%